﻿/*------------------------------------------------
// File Description: OutboundProduct DataBase Entity
// Author:			 汪亮
// Create Time:		 2020-05-18 21:51:31
//------------------------------------------------*/

using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IOA.MES.DataAccess.Entity
{
    /// <summary>
    /// 出库单包
    /// </summary>
    [Table(nameof(OutboundPack))]
    public class OutboundPack : BaseEntity
    {
        private string _outboundNo = string.Empty;
        private string _packNo = string.Empty;
        private string _packBatchNo = string.Empty;
        private string _warehouseCode = string.Empty;
        private string _warehouseName = string.Empty;
        private string _areaCode = string.Empty;
        private string _areaName = string.Empty;
        private string _location = string.Empty;

        #region Public Property

        ///<Summary>
        /// 出库单号
        ///</Summary>
        public string OutboundNo
        {
            get { return string.IsNullOrWhiteSpace(_outboundNo) ? string.Empty : _outboundNo; }
            set { _outboundNo = value; }
        }

        ///<Summary>
        /// 打包编号
        ///</Summary>
        public string PackNo
        {
            get { return string.IsNullOrWhiteSpace(_packNo) ? string.Empty : _packNo; }
            set { _packNo = value; }
        }

        ///<Summary>
        /// 打包批次号
        ///</Summary>
        public string PackBatchNo
        {
            get { return string.IsNullOrWhiteSpace(_packBatchNo) ? string.Empty : _packBatchNo; }
            set { _packBatchNo = value; }
        }

        ///<Summary>
        /// 仓库代码
        ///</Summary>
        public string WarehouseCode
        {
            get { return string.IsNullOrWhiteSpace(_warehouseCode) ? string.Empty : _warehouseCode; }
            set { _warehouseCode = value; }
        }

        ///<Summary>
        /// 仓库名称
        ///</Summary>
        public string WarehouseName
        {
            get { return string.IsNullOrWhiteSpace(_warehouseName) ? string.Empty : _warehouseName; }
            set { _warehouseName = value; }
        }

        ///<Summary>
        /// 库区代码
        ///</Summary>
        public string AreaCode
        {
            get { return string.IsNullOrWhiteSpace(_areaCode) ? string.Empty : _areaCode; }
            set { _areaCode = value; }
        }

        ///<Summary>
        /// 库区名称
        ///</Summary>
        public string AreaName
        {
            get { return string.IsNullOrWhiteSpace(_areaName) ? string.Empty : _areaName; }
            set { _areaName = value; }
        }

        ///<Summary>
        /// 库位号
        ///</Summary>
        public string Location
        {
            get { return string.IsNullOrWhiteSpace(_location) ? string.Empty : _location; }
            set { _location = value; }
        }

        ///<Summary>
        /// 是否已出库
        ///</Summary>
        public bool Outbounded { get; set; }
        #endregion
    }

    public partial class MESContext
    {
        /// <summary>
        /// 出库单包
        /// </summary>
        public virtual DbSet<OutboundPack> OutboundPacks { get; set; }
    }
}